const { ObjectId } = require('mongodb');
const {
    IncAndExpType
} = require('../../../model/incAndExp/type');


module.exports = async (req, res) => {
    let name = req.fields.name
    let id = req.fields.id
    IncAndExpType.updateOne({ _id: ObjectId(req.fields.id) }, { name: req.fields.name }).then(result => {
        res.send({ 'code': 0, "msg": "编辑成功" });
    })
}